﻿using System;
using System.Collections;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Web.Script.Services;
using MasApp.BLL;

namespace MasApp.ws.auth
{
    /// <summary>
    ///登录验证类服务
    /// </summary>
    [WebService(Namespace = "http://www.mas1.com/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    //若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务，请取消对下行的注释。 
    [System.Web.Script.Services.ScriptService]
    public class login : System.Web.Services.WebService
    {

        public login()
        {

            //如果使用设计的组件，请取消注释以下行 
            //InitializeComponent(); 
        }

        [WebMethod(Description = "检查验证码", EnableSession = true)]
        [ScriptMethod(ResponseFormat = ResponseFormat.Json)]
        public bool checkValidate(string key)
        {
            return key.ToLower() == SessUtil.getValidateKey(Session).ToLower();
        }

    }

}